<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
  String departmentId=request.getParameter("departmentId");
  System.out.println("======================"+departmentId);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>新建员工</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=basePath%>/style/main.css" rel="stylesheet"
			type="text/css" />
    <link href="<%=basePath%>/style/jquery-ui-1.8.16.custom.css" rel="stylesheet"
			type="text/css" />
		<link type="text/css" rel="stylesheet"
			href="<%=basePath%>/style/style.css" />
	<script src="<%=basePath%>/Scripts/jquery-1.3.1.js" type="text/javascript"></script>
	<script src="<%=basePath%>/Scripts/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
	<script src="<%=basePath%>/Scripts/ui.datepicker-zh_CN.js" type="text/javascript"></script>
	
    <script src="<%=basePath%>/Scripts/jquery.validate.js" type="text/javascript"></script>
	<style>
	body{ padding:10px}
	.mydiv input {
		width: 160px;
		font-size: 15pt;
		border: solid 1px #7F9DB9;
		padding: 0px 0px;
		font-size: 15px;	
       }
	.mydiv{
	background-color: #F1F6FF;
	padding: 10px;
	 border:1px solid #5BA8DE;
	}
	.mydiv legend{
	font-size: 20px;	
	}
	label { width: 10em; float: left; }
		label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
		em { font-weight: bold; padding-right: 1em; vertical-align: top; }
		em.error {
		  background:url("<%=basePath%>/images/unchecked.gif") no-repeat 0px 0px;
		  padding-left: 16px;
		}
		em.success {
		  background:url("<%=basePath%>/images/checked.gif") no-repeat 0px 0px;
		  padding-left: 16px;
		}
	</style>
	<script type="text/javascript">
	function datePicker(pickerName,locale) {
		$(pickerName).datepicker($.datepicker.regional[locale]);
		$(pickerName).datepicker('option', 'changeMonth', true);//月份可调
		$(pickerName).datepicker('option', 'changeYear', true);//年份可调
		
	}
	 $(function(){
	  datePicker('#employeeBornDate','zh_CN');
	  datePicker('#enterDate','zh_CN');
	  datePicker('#evalidate','zh_CN');
	  
  $("#EmployeeMessage").validate({
		rules: {
			employeeId: { 
				required: true,
				minlength: 6
			},
			employeeIdcard:{
			required:true,
			minlength:18
			},
			employeeNameC:{
			required:true,
			minlength:2
			},			
			employeeNameE:{
			required:true,
			minlength:4
			},
			employeeBornDate:{
			required:true,
			minlength:4
			},
			enterDate:{
			required:true,
			minlength:4
			},
			employeeAddress:{
			required:true,
			minlength:4
			},
			employeePc:{
			required:true,
			minlength:6
			},
			employeePh: {
				required: true,
				minlength: 11
			},
			employeeTel:{
			required:true,
			minlength:8
			},
			employeeemail:{
			required:true,
			email:true
			},
			employeefax:{
			required:true,
			minlength:6
			},
			edeposit:{
			required:true,
			minlength:1
			},
			ezhanye:{
			required:true,
			minlength:4
			},
			eadgen:{
			required:true,
			minlength:2
			},
			contacct:{
			required:true,
			minlength:4
			}
		},
		messages: {
			employeeId: {
				required: '请输入员工编号',
				minlength: '编号至少六位，字母+数字'
			},
			employeeIdcard: {
				required: '请输入员工身份证号',
				minlength: '18位或21位 '
			},
			employeeNameC: {
			required:'请输入员工姓名',
			minlength:'至少2个字符'
			},
			employeeNameE: {
			required:'请输入员工英文名称',
			minlength:'至少四个字符'
			},
			employeeBornDate:{
			required:'请输入员工出生日期',
			minlength:'标准格式'
			},
			enterDate:{
			required:'请输入入司日期',
			minlength:'标准格式'
			},
			employeeAddress:{
			required:'请输入员工住址',
			minlength:'至少4个字符'
			},
			employeePc:{
			required:'请输入邮编',
			minlength:'至少6位'
			},
			employeePh: {
				required: '请输入员工手机号',
				minlength:'11位'
			},
			employeeTel:{
			required:'请输入电话号',
			minlength:'8位'
			},
			employeeemail:{
			required:'请输入员工email',
			email:'请输入正确的email格式'
			},
			employeefax:{
			required:'请输入员工的传真号',
			minlength:'至少6位'
			},
			edeposit:{
			required:'请填写押金',
			minlength:'请填数字'
			},
			ezhanye:{
			required:'请填写展业证号',
			minlength:'至少4位'
			},
			eadgen:{
			required:'请填写代理证号',
			minlength:'至少4位'
			},
			contacct:{
			required:'请填写合同号',
			minlength:'至少4位'
			}
			
		},	
		
		errorElement: "em", //可以用其他标签，记住把样式也对应修改
		success: function(label) {
			//label指向上面那个错误提示信息标签em
			label.text(" ")				//清空错误提示消息
				.addClass("success");	//加上自定义的success类
		}
	  });});
	
	</script>
  </head>
  
  <body>
<div id="subCompanyDiv" class="mydiv">
    <form id="EmployeeMessage" action="NewEmployee" method="post">
     <fieldset class="myfieldset">
    <div class="FuckTittle"><span class="title">基本资料</span></div>
      <p>&nbsp;</p>
      <div class="table4">
    <input type="hidden" id="departmentId" name="departmentId" value="<%=departmentId%>" />
     <p>
    <label for="employeeId">员工编号：</label><input type="text" name="employeeId" id="employeeId"/>&nbsp;&nbsp;&nbsp;&nbsp;
    身份证号:<input type="text" id="employeeIdcard" name="employeeIdcard"/>
    </p><p>&nbsp;</p>
     <p>
     <label for="employeeNameC">中文名称：</label><input type="text" name="employeeNameC" id="employeeNameC"/>&nbsp;&nbsp;&nbsp;&nbsp;
     英文名称:<input type="text" id="employeeNameE" name="employeeNameE"/>
    </p><p>&nbsp;</p>
    <p>
     <label for="password">初始密码：</label><input type="text" name="password" id="password" value="123456"/>&nbsp;&nbsp;&nbsp;&nbsp;
     员工性别:<select name="employeeSex" id="employeeSex">
          <option selected="selected">男</option>
          <option>女</option>
          </select>
    </p><p>&nbsp;</p>
	<p>
	<label for="employeeBornDate">出生日期：</label><input type="text" id="employeeBornDate" name="employeeBornDate"/>&nbsp;&nbsp;&nbsp;&nbsp;
	最高学历：<select name="employeeEdu" id="employeeEdu">
	         <option>小学</option>
	         <option>初中</option>
	         <option>高中</option>
	         <option>专科</option>
	         <option selected="selected">本科</option>
	         <option>硕士</option>
	         <option>博士</option>
	         <option>博士后</option>
	         </select>
	</p><p>&nbsp;</p>	
	
	<p>
	<label for="employeeMarrige">婚姻状况：</label><select id="employeeMarrige" name="employeeMarrige">
	                                              	<option value="1" selected="selected">
																已婚
															</option>
															<option value="0">
																未婚
															</option>
	                                               </select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	入司日期：<input id="enterDate" name="enterDate"/>
	</p><p>&nbsp;</p>	
	
	<p>
	<label for="employeepositionId">员工职位：</label><select id="employeepositionId" name="employeepositionId">
	                                              	<option selected="selected">
																理财顾问
															</option>
															<option>
																理财主任
															</option>
															<option>
																行销经理
															</option>
															<option>
																高级行销经理
															</option>
															<option>
																理财经理
															</option>
															<option>
																区域经理
															</option>
	                                               </select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	职位状态：<select name="employeeStatu" id="employeeStatu">
															<option value="在职" selected="selected">
																在职
															</option>
															<option value="离职">
																离职
															</option>
														</select>
	</p><p>&nbsp;</p>											
    <p>
    <label for="ezhanye">展业证号：</label><input type="text" name="ezhanye" id="ezhanye"/>&nbsp;&nbsp;&nbsp;&nbsp;
           有效日期至： <input type="text" name="evalidate" id="evalidate"/>
    </p><p>&nbsp;</p>
    
     <p>
    <label for="employeePh">手机号码：</label><input type="text" name="employeePh" id="employeePh"/>&nbsp;&nbsp;&nbsp;&nbsp;
           电话号码：<input type="text" name="employeeTel" id="employeeTel" />
    </p><p>&nbsp;</p>	
    
     <p>
    <label for="employeeemail">电子邮箱：</label><input type="text" name="employeeemail" id="employeeemail"/>&nbsp;&nbsp;&nbsp;&nbsp;
           传&nbsp;&nbsp;&nbsp;&nbsp;真：<input type="text" name="employeefax" id="employeefax" />
    </p><p>&nbsp;</p>
    
    <p>
    <label for="edeposit">员工押金：</label><input type="text" name="edeposit" id="edeposit"/>&nbsp;&nbsp;&nbsp;&nbsp;
            代理证号:<input type="text" id="eadgen" name="eadgen"/>
    </p><p>&nbsp;</p>
     <p>
    <label for="employeeAddress">员工地址：</label><input type="text" name="employeeAddress" id="employeeAddress"/>&nbsp;&nbsp;&nbsp;&nbsp;
          邮政编码：<input type="text" name="employeePc" id="employeePc"/>
          
    </p><p>&nbsp;</p>
    
     <p>
    <label for="contacct">合&nbsp;同&nbsp;号：</label><input type="text" name="contacct" id="contacct"/>&nbsp;&nbsp;&nbsp;&nbsp;
    </p>	
     <p >
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="input" type="submit"  value="下一步"  class="btn_1" />&nbsp;&nbsp; <input name="input" type="reset"  value="重置"  class="btn_1"/>
    </p>	</div>											
    </fieldset>
   </form>
   </div>   
  </body>
</html>
